package com.bf.xpdd.persistent.iface;

import java.sql.SQLException;
import java.util.List;

import com.bf.xpdd.domain.ActivityGlobal;
import com.bf.xpdd.domain.ActivitySettingBean;
import com.bf.xpdd.domain.SiteSeller;
import com.ibatis.sqlmap.client.SqlMapClient;

/**
 * Dao Seller
 * @author Fantastic
 * @version 1.0.0 2011-06-25
 * @since 1.0.0
 */
public interface DaoSeller
{
	/**
	 * query seller is exist
	 * @return nick
	 * @throws SQLException
	 */
	boolean querySellerIsExist(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;
	
	/**
	 * insert new seller
	 * @throws SQLException
	 */
	long insertNewSeller(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;

	/**
	 * insert new activity
	 * @param sqlMapClient
	 * @param global
	 */
	void insertActivityGlobal(SqlMapClient sqlMapClient, ActivityGlobal global) throws SQLException;

	/**
	 * insert new activitySetting
	 * @param sqlMapClient
	 * @param setting
	 * @throws SQLException
	 */
	void insertActivitySetting(SqlMapClient sqlMapClient, ActivitySettingBean setting) throws SQLException;
	
	/**
	 * query Seller SessionKey Is Exist
	 * @param sqlMapClient
	 * @param seller
	 * @return
	 * @throws SQLException 
	 */
	boolean querySellerSessionKeyIsExist(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;

	/**
	 * update seller session key
	 * @param sqlMapClient
	 * @param seller
	 */
	void updateSellerSessionKey(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;

	/**
	 * insert seller session key
	 * @param sqlMapClient
	 * @param seller
	 */
	void insertSellerSessionKey(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;

	/**
	 * insert seller session key
	 * @param sqlMapClient
	 * @param seller
	 */
	List<SiteSeller> queryAllSellerSessionKeyActive(SqlMapClient sqlMapClient) throws SQLException;

	/**
	 * query session key by nick
	 * @param sqlMapClient
	 * @param nick
	 * @return
	 */
	SiteSeller querySessionKeyByNick(SqlMapClient sqlMapClient, String nick) throws SQLException;

	/**
	 * delete session key by nick
	 * @param sqlMapClient
	 * @param nick
	 */
	void deleteSellerSessionKeyByNick(SqlMapClient sqlMapClient, SiteSeller seller) throws SQLException;

	/**
	 * delete session key by nick
	 * @param sqlMapClient
	 * @param nick
	 */
	void deleteAllSellerSessionKey(SqlMapClient sqlMapClient) throws SQLException;
}
